def solve():
    n = int(input())
    prime = []
    d = {}
    for i in range(2, n+1):
        if not (i in d):
            d[i] = i
            prime.append(i)
        for p in prime:
            if p > d[i] or p * i > n:
                break
            d[p * i] = p
    for p in prime:
        print(p)


if __name__ == '__main__':
    solve()
